<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>发布稿件- ${site.name} - Powered by JEECMS</title>
<link href="${resSys}/front.css" rel="stylesheet" type="text/css"/>
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script src="${resSys}/front.js" type="text/javascript"></script>
<script src="${base}/thirdparty/ckeditor/ckeditor.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../../${res}/css/member.css" />
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
$.validator.methods.leafChannel = function(value, element, param) {
	var i = element.selectedIndex;
	return $(element.options[i]).attr("class")!="sel-disabled";
}
$(function() {
	$("#jvForm").validate({
		rules: {
			channelId: {
				required: true,
				leafChannel: true
			}
		},
		messages:{
			channelId: {
				leafChannel: "请选择末级栏目"
			}
		}
	});
});
</script>
</head>
<body>
[#include "member_ban.html"/]
<div class="container">
	 [#include "member_nav.html"/]
    <div class="mc_right">
        [#include "member_top.html"/]
        <div class="mr-top-position">
		     <div class="mr-top-tit fl">发布稿件</div>
		    <div class="modify fr"><a href="${base}/member/contribute_list.jspx">稿件列表</a></div>
		 </div>
        <div class="mc_content">   
           	[#if channelList?size gt 0]
            <form id="jvForm" action="contribute_save.jspx" method="post">
             <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C8DCF0" style="margin:5px;">
               <tr>
                 <td width="86" height="25" align="right" bgcolor="#f6fbff">标题：</td>
                 <td width="626" bgcolor="#FFFFFF"><input type="text" name="title" maxlength="150" class="required"/> <span class="STYLE1">*</span></td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">TAGS：</td>
                 <td bgcolor="#FFFFFF">
                 <input type="text" name="tagStr" maxlength="255"/> 用,分割</td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">作者：</td>
                 <td bgcolor="#FFFFFF"><input type="text" name="author" maxlength="100"/></td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">栏目：</td>
                 <td bgcolor="#FFFFFF">
                 <select name="channelId">
                    <option value="" class="sel-disabled">--请选择--</option>
                [#if channelList?size gt 0]
                [#assign origDeep=channelList[0].deep+1/]
                [#list channelList as c]
                    <option value="${c.id}"[#if c.child?size gt 0] class="sel-disabled"[/#if]>[#if c.deep gte origDeep][#list origDeep..c.deep as i]&nbsp;&nbsp;[/#list]>[/#if]${c.name}</option>
                [/#list]
                [/#if]
                </select>
                 </td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">摘要：</td>
                 <td bgcolor="#FFFFFF"><textarea name="description" rows="3" cols="70" maxlength="255"/></textarea></td>
               </tr> 
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">内容：</td>
                 <td bgcolor="#FFFFFF">
                 <textarea id="txt" name="txt"></textarea> 
                 <script type="text/javascript">
						$(function() {
						   	CKEDITOR.replace( 'txt' ,
						   			{
								   		filebrowserUploadUrl : '${base}/fck/upload.jspx',  
								   		filebrowserImageUploadUrl : '${base}/fck/upload.jspx?Type=Image',  
								   		filebrowserFlashUploadUrl : '${base}/fck/upload.jspx?Type=Flash',
								   		filebrowserMediaUploadURL : '${base}/fck/upload.jspx?Type=Media'
						   		     }
						   	);  
						 });
				</script>
                 </td>
               </tr> 
               <tr>
                      <td width="13%" height="30" align="right" bgcolor="#fafafa">验证码：</td>
                      <td bgcolor="#FFFFFF">
                     <input type="text" name="captcha" maxlength="20" class="required"/> 
                       </td>
               </tr>
               <tr>
                      <td width="13%" align="right" bgcolor="#fafafa"></td>
                      <td bgcolor="#FFFFFF">
                     <img id="guestbookCaptcha" src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()"/>
                       </td>
               </tr>
               <tr>
                 <td height="25" colspan="2" align="center" bgcolor="#FFFFFF">
                 <input type="hidden" name="nextUrl" value="contribute_list.jspx"/>
                 <input type="submit" value="提交" class="member_button"/> <input type="reset" value="重置" class="member_button"/>
                 </td>
                 </tr>
             </table>
             </form>
            [#else]
            <div>系统不允许投稿，请联系管理员！</div>
            [/#if]
    	</div>
  </div>
     <div style="clear:both"></div>
</div>
</body>
</html>
